home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5046 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: newshost.lanl.gov!tanmoy
  2. From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: What does the -O option do???!!!
  5. Date: 10 Feb 1996 23:27:12 GMT
  6. Organization: Los Alamos National Laboratory
  7. Message-ID: <TANMOY.96Feb10162712@qcd.lanl.gov>
  8. References: <4ehger$cj9@mark.ucdavis.edu> <4emlsq$odt@airdmhor.gen.nz>
  9.     <pronet01.34.003B9BB5@indirect.com> <823827008snz@genesis.demon.co.uk>
  10.     <4fiphrINNrvr@keats.ugrad.cs.ubc.ca>
  11. NNTP-Posting-Host: qcd.lanl.gov
  12. Mime-Version: 1.0
  13. Content-Type: text
  14. In-reply-to: c2a192@ugrad.cs.ubc.ca's message of 10 Feb 1996 10:52:43 -0800
  15.  
  16. In article <4fiphrINNrvr@keats.ugrad.cs.ubc.ca> c2a192@ugrad.cs.ubc.ca
  17. (Kazimir Kylheku) writes: 
  18. <snip>
  19.    If you write your own free() with different semantics, you would
  20. not want the 
  21.    compiler messing with that. It's just another function, after
  22. all. Some 
  23.    compilers have special directives that you can apply to function
  24. prototypes 
  25.    that give a hint to the compiler (for example, hints like "this
  26. function does 
  27.    not return, so you may treat client code accordingly").
  28.  
  29. It is precisely for this reason that the standard is careful. If you
  30. define your own function called free, in that case the compiler gets
  31. the permission to do whatever it pleases: the constraints of nice
  32. behaviour that the standard places on it no longer holds :-)
  33.  
  34. Cheers
  35. Tanmoy--
  36. tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
  37. Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
  38. Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
  39. <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
  40. internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
  41. fax: 1 (505) 665 3003   voice: 1 (505) 665 4733    [ Home: 1 (505) 662 5596 ]
  42.